package com.hx.io.filereader;

import java.io.*;

/**
 * @author jxlgcmh
 * @create 2019-05-09 15:27
 */
public class ReaderDemo {
    public static void main(String[] args) throws IOException {
        //注意相对路径问题  project与module的不同
        Reader reader = new FileReader("a.txt");
//		int data = reader.read();
//		while (data != -1) {
//			System.out.print((char)data);
//			data=reader.read();
//		}
        int data;
        while ((data = reader.read()) != -1) {
            System.out.print((char) data);
        }
        reader.close();
    }
}
